﻿ 
using System;

namespace CarTrackr.Business.Validation 
{
    public  class RequiredRule: Rule
    {
       public override RuleType Type
       {
            get
            {
                return RuleType.Required; 
            }
       }

       public override string Text
       {
           get
           {
               return PropertyName + " is required.";
           }
       }

        public override bool Validate(string value)
        {
            return !String.IsNullOrEmpty(value.Trim());
        }
    }
}
